package niuke;

import java.util.Scanner;

public class 游戏任务标记 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n1 = scanner.nextInt();
        int n2 = scanner.nextInt();
        if(n1<=0 || n1>1024 || n2<=0 || n2>1024){
            System.out.println(-1);
            return;
        }
        if(n1 == n2){
            System.out.println(1);
        }else {
            System.out.println(0);
        }
    }
}
